#include "val2string.h"
#include <string>

#include <iostream>

bool val2stringint()
{
  std::string test_value = "10";
  std::string result = tostring<int>(10);
  return (result.compare(test_value) == 0 ? true : false);
}

bool val2stringdouble()
{
  std::string test_value = "3.1415926535897935";
/* now 16 digitis is max : 16 digits is OK, 17 - not OK.*/
  std::string result = tostring<long double>(3.1415926535897935,16);  
  return (result.compare(test_value) == 0 ? true : false);
}

bool val2stringfloat()
{
  std::string test_value = "12.2222";
  std::string result = tostring<float>(12.2222);
  return (result.compare(test_value) == 0 ? true : false);
}

bool val2stringlong()
{
  std::string test_value = "33333333";
  std::string result = tostring<long>(33333333);
  return (result.compare(test_value) == 0 ? true : false);
}

bool val2stringlonglong()
{
  std::string test_value = "4444444444444444";
  std::string result = tostring<long long>(4444444444444444);
  return (result.compare(test_value) == 0 ? true : false);
}

